<?php

class Default_Form_Profile extends Zend_Form
{
    public function init()
    {
        $this->setAttrib('id', 'resetDataForm');
        $this->addElement('password','oldPassword',array(
            'size' => 20,
            'required' => true,
            'label' => 'old password',
             'filters'    => array('StringTrim','StripTags'),
            'validators' => array('NotEmpty' ,array('stringLength', false, array(6, 20)))
        ));

        $passwordConfirmation = new Sfs_Validate_PasswordConfirmation();
        $this->addElement('password','password',array(
            'size' => 20,
            'required' => true,
            'label' => 'new password',
             'filters'    => array('StringTrim','StripTags'),
            'validators' => array('NotEmpty' , $passwordConfirmation, array('stringLength', false, array(6, 20)))
        ));


        $this->addElement('password','password_confirm',array(
            'size' => 20,
            'required' => true,
            'label' => 'confirm password',
             'filters'    => array('StringTrim','StripTags'),
            'validators' => array('NotEmpty', $passwordConfirmation, array('stringLength', false, array(6, 20)))
        ));


        $this->addElement('text', 'email', array(
            'label' => 'Email address',
            'required' => true,
            'filters'    => array('StringTrim','StripTags'),
            'validators' => array('NotEmpty','EmailAddress')
        ));

        $this->addElement('submit', 'submit',array(
            'label' => 'confirm butoon'
            ));
    }

}